package com.example.zk2_lx.db;

import androidx.room.Entity;
import androidx.room.PrimaryKey;

@Entity(tableName = "message")
public class MessagedbEntity {
    @PrimaryKey(autoGenerate = true)
    private int id;
    private String username;
    private String tousername;
    private int type;//0代表发送 1代表接收
    private String content;//真实使用中建议为Object

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getTousername() {
        return tousername;
    }

    public void setTousername(String tousername) {
        this.tousername = tousername;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public MessagedbEntity(String username, String tousername, int type, String content) {
        this.username = username;
        this.tousername = tousername;
        this.type = type;
        this.content = content;
    }
}
